<?php
	if(!array_key_exists("subscribe", $_POST)){
		header("Location: index.php");
	}
	$conn = mysql_connect("", "piedu_user", "q&&^%@8ezO8+");
	mysql_select_db("piedu_db");
	$sql = "insert into subscribe(email) values ('{$_POST['subscribe']}')";
	mysql_query($sql, $conn);
	header("Location: index.php?subscribe=true");
?>